<?php

//<editor-fold defaultstate="collapsed" desc="License & Copyright">
/*
 * @license
 */

/**
 *
 * @author Jevgeni Geimanen (jevgeni.geimanen@gmail.com)
 */
//</editor-fold>
class SCComponentHelper {
    /**
     *
     * @param string $className
     * @return string
     */
    public static function classNameToControlName($className) {
        $res = array();
        if (count($words = preg_split("/_/", $className)) > 0) {
            foreach ($words as $word) {
                if (in_array($word, array('class')))
                    continue;
                $res[] = !count($res) ? $word : ucfirst($word);
            }
        }
        return join("", $res);
    }
}

?>
